<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/finance/zccb/yjy_whole_wlzb.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/finance/zccb/yjy_whole_wlzb.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'yjy_whole_wlzb_id',
                footer: "Foots",
                cnName: '物料主表',
                name: 'zccb/yjy_whole_wlzb',
                url: "/yjy_whole_wlzb/",
                sortName: "CreateDate"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"componentnum":"","unitprice":[null,null],"finalprice":[null,null],"parent_componentnum":""});
            const searchFormOptions = ref([[{"title":"物料号","field":"componentnum","type":"like"},{"title":"单价","field":"unitprice","type":"range"}],[{"title":"父物料号","field":"parent_componentnum","type":"like"},{"title":"价格异议","field":"finalprice","type":"range"}]]);
            const columns = ref([{field:'yjy_whole_wlzb_id',title:'物料主表',type:'guid',width:110,require:true,align:'left',sort:true},
                       {field:'materialnum',title:'整车头物料号',type:'string',width:110,align:'left'},
                       {field:'componentnum',title:'物料号',type:'string',width:110,align:'left'},
                       {field:'MTyp',title:'MTYP',type:'string',width:110,align:'left'},
                       {field:'description',title:'对象描述',type:'string',width:220,align:'left'},
                       {field:'num',title:'数量',type:'decimal',width:110,align:'left'},
                       {field:'pricesource',title:'价格来源',type:'string',width:110,align:'left'},
                       {field:'unitprice',title:'单价',type:'decimal',width:110,align:'left'},
                       {field:'codename',title:'代码',type:'string',width:110,align:'left'},
                       {field:'creationdate',title:'创建日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'finalprice',title:'价格异议',type:'decimal',width:110,align:'left'},
                       {field:'bomeffectivedatestart',title:'BOM有效起始日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'bomeffectivedateend',title:'BOM有效截止日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'pricereason',title:'调价原因',type:'string',width:220,align:'left'},
                       {field:'parent_componentnum',title:'父物料号',type:'string',width:220,align:'left'},
                       {field:'is_delete',title:'是否删除，0:未删除，1:已删除',type:'int',width:110,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Modifier',title:'修改人',type:'string',width:100,align:'left'},
                       {field:'ModifyDate',title:'修改日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'tree_id',title:'层级id',type:'int',width:80,align:'left'},
                       {field:'priceeffectivedatestart',title:'价格有效开始时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'priceeffectivedateend',title:'价格有效结束时间',type:'datetime',width:150,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
